<?xml version="1.0" encoding="utf-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0">
  <start>
    <element name="library">
      <ref name="library-content"/>
    </element>
  </start>
  <define name="library-content">
    <oneOrMore>
      <element name="book">
        <externalRef href="book-grammar.rng"/>
      </element>
    </oneOrMore>
  </define>
  <define name="id-content">
    <text/>
  </define>
  <define name="available-content">
    <text/>
  </define>
  <define name="isbn-content">
    <text/>
  </define>
  <define name="title-content">
    <attribute name="xml:lang"/>
    <text/>
  </define>
  <define name="author-content">
    <attribute name="id">
      <ref name="id-content"/>
    </attribute>
    <element name="name">
      <ref name="name-content"/>
    </element>
    <element name="born">
      <ref name="born-content"/>
    </element>
    <optional>
      <element name="dead">
        <ref name="dead-content"/>
      </element>
    </optional>
  </define>
  <define name="born-content">
    <text/>
  </define>
  <define name="character-content">
    <attribute name="id">
      <ref name="id-content"/>
    </attribute>
    <element name="name">
      <ref name="name-content"/>
    </element>
    <element name="born">
      <ref name="born-content"/>
    </element>
    <element name="qualification">
      <ref name="qualification-content"/>
    </element>
  </define>
  <define name="name-content">
    <text/>
  </define>
  <define name="dead-content">
    <text/>
  </define>
  <define name="qualification-content">
    <text/>
  </define>
</grammar>
